package com.hainatong.jcmvvmbase.mainhome.fragment;


import com.hainatong.jcmvvmbase.Constants;
import com.hainatong.jcmvvmbase.MvvmLazyFragment;
import com.hainatong.jcmvvmbase.R;
import com.hainatong.jcmvvmbase.databinding.FragmentUserBinding;
import com.hainatong.jcmvvmbase.mainhome.ComFragmentActivity;
import com.hainatong.mvvmbase.base.NoViewModel;

import android.os.Bundle;
import android.view.View;


public class UserFragment extends MvvmLazyFragment<FragmentUserBinding, NoViewModel>
{

    @Override
    public int getLayoutId()
    {
        return R.layout.fragment_user;
    }

    @Override
    public int getBindingVariable()
    {
        return 0;
    }

    @Override
    protected void onRetryBtnClick()
    {

    }

    @Override
    protected void initView(View view)
    {
        viewDataBinding.rlUserInfo.setOnClickListener(v -> {

            Bundle bundle = new Bundle();
            bundle.putString(Constants.FRAGMNET_TYPE , Constants.USER_INFO);
            ComFragmentActivity.start(getActivity(),bundle);

        });

        viewDataBinding.rlSetPwd.setOnClickListener(v -> {

            Bundle bundle = new Bundle();
            bundle.putString(Constants.FRAGMNET_TYPE , Constants.SET_PWD);
            ComFragmentActivity.start(getActivity(),bundle);

        });
        viewDataBinding.rlHandPwd.setOnClickListener(v -> {
            Bundle bundle = new Bundle();
            bundle.putString(Constants.FRAGMNET_TYPE , Constants.HAND_PWD);
            ComFragmentActivity.start(getActivity(),bundle);
        });

        viewDataBinding.rlChangeLanguage.setOnClickListener(v -> {
            Bundle bundle = new Bundle();
            bundle.putString(Constants.FRAGMNET_TYPE , Constants.CHANGE_LANGUAGE);
            ComFragmentActivity.start(getActivity(),bundle);
        });

        viewDataBinding.rlSignOut.setOnClickListener(v -> {

        });

    }
}
